# $Id: PKGBUILD 72704 2012-06-20 12:26:14Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Morgan LEFIEUX <comete_AT_archlinuxfr.org>

pkgname=python2-ldap
pkgver=2.4.10
pkgrel=1
pkgdesc="Provides an object-oriented API to access LDAP directory servers from Python programs"
arch=('i686' 'x86_64')
url="http://python-ldap.sourceforge.net"
license=('custom')
depends=('python2' 'libldap>=2.4.26')
makedepends=('chrpath')
replaces=('python-ldap')
source=(http://pypi.python.org/packages/source/p/python-ldap/python-ldap-$pkgver.tar.gz)
md5sums=('a15827ca13c90e9101e5e9405c1d83be')

build() {
  cd $srcdir/python-ldap-$pkgver
  sed -i 's|<sasl.h>|<sasl/sasl.h>|' Modules/LDAPObject.c
  python2 setup.py build
  python2 setup.py install --root $pkgdir
  install -D -m644 LICENCE $pkgdir/usr/share/licenses/$pkgname/LICENSE
  chrpath -d $pkgdir/usr/lib/python2.7/site-packages/_ldap.so
}
